<?php
/**
 * Created by PhpStorm.
 * User: Aliaxandr Lazerka
 * Date: 10/26/14
 * Time: 11:31 AM
 */
include_once("functions/db_manipulate.php");

if ($_POST['email'] != null) {
  if (getUsrNameByMail($_POST['email']) != null) {

    //TODO: Send new generated password on email

      header("Location: " . $_POST['url'] . "&err=-100");
  } else {
    header("Location: " . $_POST['url'] . "&err=1030");
  }
} else {
    header("Location: " . $_POST['url'] . "&err=1031");
}